package com.db.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class Person implements Serializable {
    private Integer id;
    private String name;
    private Date birthday;//java.util
    private String sex;
    private String mobile;
    private String address;
    private String face;
    private Integer userid;

    public Person() {
    }

    public Person(Integer id, String name, Date birthday, String sex, String mobile, String address, String face) {
        this.id = id;
        this.name = name;
        this.birthday = birthday;
        this.sex = sex;
        this.mobile = mobile;
        this.address = address;
        this.face = face;
    }

    public Person(Integer id, String name, Date birthday, String sex, String mobile, String address, String face, Integer userid) {
        this.id = id;
        this.name = name;
        this.birthday = birthday;
        this.sex = sex;
        this.mobile = mobile;
        this.address = address;
        this.face = face;
        this.userid = userid;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", birthday=" + birthday +
                ", sex='" + sex + '\'' +
                ", mobile='" + mobile + '\'' +
                ", address='" + address + '\'' +
                ", face='" + face + '\'' +
                ", userid=" + userid +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getFace() {
        return face;
    }

    public void setFace(String face) {
        this.face = face;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(id, person.id) && Objects.equals(name, person.name) && Objects.equals(birthday, person.birthday) && Objects.equals(sex, person.sex) && Objects.equals(mobile, person.mobile) && Objects.equals(address, person.address) && Objects.equals(face, person.face) && Objects.equals(userid, person.userid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, birthday, sex, mobile, address, face, userid);
    }

}
